<?php echo $this->Form->create('Lugares', array('action' => 'lugares')); ?>
<div class="widget">
    <div class="whead"><h6>LISTADO DE LUGARES</h6><div class="clear"></div></div>
    <div class="shownpars">
        <table cellpadding="0" cellspacing="0" border="0" class="dTable">
            <thead>
                <tr>
                <th>Nro</th>
                <th>Nombre</th>
                <th>Descripcion</th>
                <th>Estado</th>
                <th>Acciones</th>
            </tr>
            </thead>
            <tbody>
                <?php $i = 1;?>
            <?php foreach ($lugares as $emp): ?>
            <?php $estado = ($emp['Lugare']['estado'] == 1) ? "activo" : "inactivo"; ?>
                <?php $clasestado = ($emp['Lugare']['estado'] == 1)? "class=tag" : "class=high";?>
            
                <tr <?php echo fmod($i, 2) ? "class = bg" : "";?>>
                    <td><?php echo $i;  $i++;?></td>
                    <td><?php echo $emp['Lugare']['nombre']; ?></td>
                    <td><?php echo $emp['Lugare']['descripcion']; ?></td>
                    <td><span <?php echo  $clasestado;?>><?php echo $estado; ?></span></td>
                    <td style="font-size:10px;">
                        <?php echo $this->Html->link('EDITAR',array('action' => 'editar', $emp['Lugare']['id']), array('class' => 'inner_a')); ?>&nbsp;
                        <?php if($estado == "activo"):?>
                        <?php echo $this->Html->link('DAR BAJA',array('action' => 'baja', $emp['Lugare']['id']), array('class' => 'inner_a')); ?>&nbsp;
                        <?php else:?>
                        <?php echo $this->Html->link('DAR ALTA',array('action' => 'alta', $emp['Lugare']['id']), array('class' => 'inner_a')); ?>&nbsp;
                        <?php endif;?>
                        <?php echo $this->Html->link('ELIMINAR',array('action'=>'eliminar',$emp['Lugare']['id']),array('class' => 'inner_a'),('Desea realmente eliminar?')); ?>      &nbsp;
                    </td>
                </tr>
            <?php endforeach; ?>                
            </tbody>
        </table>
    </div> 
</div> 


  